package com.yklx.youke.repository;

import com.yklx.youke.entity.Session;
import com.yklx.youke.entity.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;

@Repository
public interface SessionRepository extends JpaRepository<Session, UUID> {
    List<Session> findByTeacherUserId(UUID teacherId);
    List<Session> findByStudentStudentId(UUID studentId);
    List<Session> findByScheduledTimeBetween(LocalDateTime start, LocalDateTime end);
    List<Session> findByTeacherAndScheduledTimeBetween(Teacher teacher, LocalDateTime start, LocalDateTime end);
}